home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / GMS / Includes / games / games.e < prev    next >
Encoding:
Text File  |  1997-05-03  |  17.9 KB  |  549 lines

  1. /*
  2. **  $VER: games.e V0.6B
  3. **
  4. **  General include file for programs using the Games Master System.
  5. **
  6. **  (C) Copyright 1996-1997 DreamWorld Productions.
  7. **      All Rights Reserved
  8. */
  9.  
  10. OPT MODULE
  11. OPT EXPORT
  12. OPT PREPROCESS
  13.  
  14. CONST LISTSTART = $4C495354, SKIPENTRY = 0, LISTEND = -1, ENDLIST = -1,
  15.       TAGEND = 0, TAGS = $54414753, OBJECTLIST = $4F4C5354
  16.  
  17. ->**************************************************************************
  18. ->* Tag and ID definitions.
  19.  
  20. CONST ID_BOB =   $4242, ID_MBOB =    $4D42, ID_GAMESCREEN = $4753,
  21.       ID_SOUND = $534D, ID_PICTURE = $5043, ID_CARDSET =    $4352,
  22.       ID_ANIM =  $414D, ID_MAP =     $4D50, ID_MOVIE =      $4D56,
  23.       ID_FILE =  $464C, ID_SPRITE =  $5350
  24.  
  25. CONST TAGS_BOB =        $54474242, TAGS_MBOB =      $54474D42,
  26.       TAGS_GAMESCREEN = $54474753, TAGS_SOUND =     $5447534D,
  27.       TAGS_PICTURE =    $54475043, TAGS_CARDSET =   $54474352,
  28.       TAGS_ANIM =       $5447414D, TAGS_MAP =       $54474D50,
  29.       TAGS_MOVIE =      $54474D56, TAGS_SPRITE =    $54475350
  30.  
  31. ->**************************************************************************
  32. ->* Universal errorcodes returned by certain functions.
  33.  
  34. ENUM  ERR_OK,          -> Function went OK.
  35.       ERR_NOMEM,       -> Not enough memory available 
  36.       ERR_NOPTR,       -> Required pointer not present 
  37.       ERR_INUSE,       -> Previous allocations have not been freed 
  38.       ERR_STRUCT,      -> Structure version not supported or not found. 
  39.       ERR_FAILED,      -> General failure 
  40.       ERR_FILE,        -> File error, eg file not found.
  41.       ERR_DATA,        -> There is an error in the given data.
  42.       ERR_SEARCH,      -> A search routine failed to make a match.
  43.       ERR_SCRTYPE,     -> Screen Type not recognised.
  44.       ERR_GPI,         -> Trouble with initialising/using a GPI.
  45.       ERR_RASTCOMMAND, -> Invalid raster command detected.
  46.       ERR_RASTERLIST,  -> Complete rasterlist failure.
  47.       ERR_NORASTER,    -> Rasterlist missing from GS_RasterList.
  48.       ERR_DISKFULL,    -> Disk full error.
  49.       ERR_FILEMISSING, -> File not found.
  50.       ERR_WRONGVER,    -> Wrong version or version not supported.
  51.       ERR_MONITOR,     -> Monitor driver not found or cannot be used.
  52.       ERR_UNPACK       -> Problem with unpacking of data.
  53.  
  54. CONST ERR_SUCCESS = 0  -> Synonym for ERR_OK.
  55.  
  56. ->**************************************************************************
  57. ->* Memory types used by AllocMemBlock().  This is almost identical to the
  58. ->* exec definition but CHIP is renamed to VIDEO (displayable memory) and
  59. ->* there is an addition of BLIT and SOUND specific memory.  CLEARed memory
  60. ->* is redundant (all GMS memory is cleared on allocation), REVERSE and
  61. ->* NO_EXPUNGE are also unused.
  62.  
  63. CONST MEM_ANY   = $00000000,
  64.       MEM_CLEAR = $00000000,
  65.       MEM_VIDEO = $00000002,
  66.       MEM_BLIT  = $00000004,
  67.       MEM_SOUND = $00000008
  68.  
  69. ->***************************************************************************
  70. ->* File Object.
  71.  
  72. CONST FL_READ   = $00000000,
  73.       FL_WRITE  = $00000001,
  74.       FL_LOCK   = $00000002,
  75.       FL_NEW    = $00000004,
  76.       FL_FIND   = $00000008,
  77.       FL_UNPACK = $00000010,
  78.       FL_SMART  = $00000018
  79.  
  80. CONST FLV1 = $464C0000
  81.  
  82. OBJECT file
  83.   id      :LONG      -> FLV1
  84.   stats   :LONG      -> Private.
  85.   name    :LONG      -> Pointer to name of the file on disk.
  86.   bytepos :LONG      -> Current position in file.
  87.   size    :LONG      -> Total size of the file.
  88.   flags   :LONG      -> File flags.
  89. ENDOBJECT
  90.  
  91. ->**************************************************************************
  92. ->* Universal joystick status bits returned from ReadJoystick, Sega,
  93. ->* JoyPad, etc...
  94.  
  95. CONST JT_SWITCH = 0,         -> Joystick return types.
  96.       JT_ZBXY   = 1,
  97.  
  98.       JS_LEFT   = $00000001, -> Joy Switches.
  99.       JS_RIGHT  = $00000002,
  100.       JS_UP     = $00000004,
  101.       JS_DOWN   = $00000008,
  102.       JS_ZIN    = $00000010, 
  103.       JS_ZOUT   = $00000020,
  104.  
  105.       JS_FIRE1  = $00010000, -> Fire Buttons 
  106.       JS_FIRE2  = $00020000, -> For 2 button joysticks 
  107.       JS_FIRE3  = $00040000, -> For 3 button joysticks
  108.       JS_FIRE4  = $00080000,
  109.       JS_FIRE5  = $00100000,
  110.       JS_FIRE6  = $00200000,
  111.       JS_FIRE7  = $00400000,
  112.       JS_FIRE8  = $00800000,
  113.  
  114.       JS_RED    = $00010000,
  115.       JS_BLUE   = $00020000,
  116.       JS_PLAY   = $00040000, -> CD32 buttons here 
  117.       JS_RWD    = $00080000,
  118.       JS_FFW    = $00100000,
  119.       JS_GREEN  = $00200000,
  120.       JS_YELLOW = $00400000,
  121.  
  122.       MB_LMB    = $00010000, -> Mouse button flags returned from 
  123.       MB_RMB    = $00020000, ->  ReadMouse(), in ZBXY format 
  124.       MB_MMB    = $00040000
  125.  
  126. -> Joyport specifications for calling ReadJoyStick/Mouse/JoyPad... 
  127.  
  128. CONST JPORT1 = 0*2,
  129.       JPORT2 = 1*2,
  130.       JPORT3 = 2*2,
  131.       JPORT4 = 3*2
  132.  
  133. OBJECT joydata
  134.   xchange :INT
  135.   ychange :INT
  136.   zchange :INT
  137.   buttons :INT
  138. ENDOBJECT
  139.  
  140. CONST JD_FIRE1 = $0001,   -> Standard Fire Button (1) - LMB.
  141.       JD_FIRE2 = $0002,   -> Standard Fire Button (2) - RMB.
  142.       JD_FIRE3 = $0004,   -> Standard Fire Button (3) - MMB.
  143.       JD_FIRE4 = $0008,
  144.       JD_FIRE5 = $0010,
  145.       JD_FIRE6 = $0020,
  146.       JD_FIRE7 = $0040,
  147.       JD_FIRE8 = $0080,
  148.  
  149.       JD_LMB   = $0001,
  150.       JD_RMB   = $0002,
  151.       JD_MMB   = $0004
  152.  
  153. PROC getZBXYx(zb)
  154.   DEF     ret:LONG
  155.   MOVE.L  zb,D0
  156.   ASR.W   #8,D0
  157.   MOVE.L  D0,ret
  158.   RETURN  ret
  159. ENDPROC
  160.  
  161. PROC getZBXYy(zb)
  162.   DEF     ret:LONG
  163.   MOVE.L  zb,D0
  164.   EXT.W   D0
  165.   EXT.L   D0
  166.   MOVE.L  D0,ret
  167.   RETURN  ret
  168. ENDPROC
  169.  
  170. ->***************************************************************************
  171. ->* GPI ID numbers. 
  172.  
  173. CONST GPI_SCREENS  = 0,
  174.       GPI_BLITTER  = 4,
  175.       GPI_SOUND    = 8,
  176.       GPI_NETWORK  = 12,
  177.       GPI_VECTORS  = 16,
  178.       GPI_FIREBALL = 20,
  179.       GPI_MOVIE    = 24,
  180.       GPI_CARDS    = 28,
  181.       GPI_TEXT     = 32,
  182.       GPI_OBJECTS  = 36,
  183.       GPI_ANIM     = 40
  184.  
  185. ->***************************************************************************
  186. ->* Standard screen structure. 
  187.  
  188. CONST GSV1 = $47530000  -> Structure ID (goes in gamescreen.version)
  189.  
  190. OBJECT gamescreen
  191.     version      :LONG  -> Structure version - GSV1
  192.     stats        :LONG  -> Private
  193.     memptr1      :LONG  -> Ptr to screen 1
  194.     memptr2      :LONG  -> Ptr to screen 2 (double buffer)
  195.     memptr3      :LONG  -> Ptr to screen 3 (triple buffer)
  196.     screenlink   :LONG  -> Ptr to a linked screen
  197.     palette      :LONG  -> Ptr to the screen palette
  198.     rasterlist   :LONG  -> Ptr to a rasterlist
  199.     amtcolours   :LONG  -> The amount of colours in the palette.
  200.     scrwidth     :INT   -> The width of the visible screen
  201.     scrheight    :INT   -> The height of the visible screen
  202.     picwidth     :INT   -> The width of the picture in pixels.
  203.     picbytewidth :INT   -> The width of the picture in bytes.
  204.     picheight    :INT   -> The height of the entire screen
  205.     planes       :INT   -> The amount of planes in da screen
  206.     scrxoffset   :INT   -> Hardware co-ordinate for TOS
  207.     scryoffset   :INT   -> Hardware co-ordinate for LOS
  208.     picxoffset   :INT   -> Offset of the horizontal axis
  209.     picyoffset   :INT   -> Offset of the vertical axis
  210.     attrib       :LONG  -> Special Attributes are?
  211.     scrmode      :INT   -> What screen mode is it?
  212.     scrtype      :INT   -> Interleaved/Planar/Chunky?
  213.     task         :LONG  -> Task that owns this screen.
  214. ENDOBJECT
  215.  
  216. CONST BUFFER1 = 8,
  217.       BUFFER2 = 12,
  218.       BUFFER3 = 16
  219.  
  220. -> SCREEN ATTRIBUTES (attrib) 
  221.  
  222. CONST DBLBUFFER = $00000001,  -> For double buffering 
  223.       TPLBUFFER = $00000002,  -> Triple buffering!! 
  224.       PLAYFIELD = $00000004,  -> Set if it's part of a playfield 
  225.       HSCROLL   = $00000008,  -> Gotta set this to do scrolling 
  226.       VSCROLL   = $00000010,  -> For vertical scrolling 
  227.       SPRITES   = $00000020,  -> Set this if you want sprites 
  228.       SBUFFER   = $00000040,  -> Creates a scroll buff for up to 100 screens.
  229.       CENTRE    = $00000080,  -> Centres the screens (sets XOffset/YOffset).
  230.       BLKBDR    = $00000100,  -> Gives a blackborder on AGA machines 
  231.       NOSCRBDR  = $00000200   -> For putting sprites in the border 
  232.  
  233. -> SCREEN TYPES (type) 
  234.  
  235. CONST INTERLEAVED = 1,        -> These are actual numbers, not bits.
  236.       ILBM        = 1,
  237.       PLANAR      = 2, 
  238.       CHUNKY8     = 3,
  239.       CHUNKY16    = 4,
  240.       TRUECOLOUR  = 5
  241.  
  242. -> SCREEN MODES (mode) 
  243.  
  244. CONST HIRES      = $0001,     -> High resolution 
  245.       SHIRES     = $0002,     -> Super-High resolution 
  246.       LACED      = $0004,     -> Interlaced 
  247.       LORES      = $0008,     -> Low resolution (default) 
  248.       EXTRAHB    = $0010,     -> Extra HalfBrite
  249.       SLACED     = $0020,     -> Super-Laced resolution.
  250.       HAM        = $0040      -> For HAM mode 
  251.  
  252. #define WAITLINE(a)         Shl(00,16) OR (a),0
  253. #define COLOUR(a,b)         Shl(02,16),(a),(b),0
  254. #define NEWPALETTE(a,b,c)   Shl(04,16),(a),(b),(c),0
  255. #define COLOURLIST(a,b,c,d) Shl(06,16) OR (a),Shl(b,16) OR (c),(d),0
  256. #define SPRITE(a)           Shl(08,16) OR (a),0
  257. #define SCROLL(a,b,c)       Shl(10,16) OR (a),Shl(b,16) OR (c),0
  258. #define FSCROLL(a,b,c,d)    Shl(12,16) OR (a),Shl(b,16) OR (c),Shl(d,16),0
  259. #define FLOOD               Shl(14,16),0
  260. #define REPOINT(a)          Shl(16,16),(a),0
  261. #define MIRROR              Shl(18,16),0
  262. #define RASTEND             $ffffffff
  263.  
  264. /* Screen tags */
  265.  
  266. CONST GSA_MEMPTR1 =      $C0000008,
  267.       GSA_MEMPTR2 =      $C000000C,
  268.       GSA_MEMPTR3 =      $C0000010,
  269.       GSA_SCREENLINK =   $C0000014,
  270.       GSA_PALETTE =      $C0000018,
  271.       GSA_RASTERLIST =   $C000001C,
  272.       GSA_AMTCOLOURS =   $80000020,
  273.       GSA_SCRWIDTH =     $40000024,
  274.       GSA_SCRHEIGHT =    $40000026,
  275.       GSA_PICWIDTH =     $40000028,
  276.       GSA_PICBYTEWIDTH = $4000002A,
  277.       GSA_PICHEIGHT =    $4000002C,
  278.       GSA_PLANES =       $4000002E,
  279.       GSA_SCRXOFFSET =   $40000030,
  280.       GSA_SCRYOFFSET =   $40000032,
  281.       GSA_PICXOFFSET =   $40000034,
  282.       GSA_PICYOFFSET =   $40000036,
  283.       GSA_SCRATTRIB =    $80000038,
  284.       GSA_SCRMODE =      $4000003C,
  285.       GSA_SCRTYPE =      $4000003E
  286.  
  287. ->***************************************************************************
  288. ->* Sprite structure.
  289.  
  290. CONST SPV1 = $53500000
  291.  
  292. OBJECT sprite
  293.    version    :LONG  -> Structure version (SPV1)
  294.    stats      :LONG  -> Reserved.
  295.    number     :INT   -> Bank number to access 
  296.    data       :LONG  -> Pointer to Sprite graphic 
  297.    xpos       :INT   -> X position 
  298.    ypos       :INT   -> Y position 
  299.    frame      :INT   -> Frame number 
  300.    width      :INT   -> Width in pixels 
  301.    height     :INT   -> Height in pixels 
  302.    amtcolours :INT   -> 4 or 16 
  303.    colstart   :INT   -> Colour bank to access, increments of 16 
  304.    planes     :INT   -> Amount of planes per bank 
  305.    scrmode    :INT   -> HiRes/LoRes/SHiRes 
  306.    fieldpos   :INT   -> Field position in relation to playfields 
  307.    attrib     :INT   -> Attributes (XLONG)
  308. ENDOBJECT
  309.  
  310. CONST XLONG = $0001
  311.  
  312. CONST SPA_NUMBER =     $40000008,
  313.       SPA_DATA =       $C000000A,
  314.       SPA_XCOORD =     $4000000E,
  315.       SPA_YCOORD =     $40000010,
  316.       SPA_FRAME =      $40000012,
  317.       SPA_WIDTH =      $40000014,
  318.       SPA_HEIGHT =     $40000016,
  319.       SPA_AMTCOLOURS = $40000018,
  320.       SPA_COLSTART =   $4000001A,
  321.       SPA_PLANES =     $4000001C,
  322.       SPA_SCRMODE =    $4000001E,
  323.       SPA_FIELDPRI =   $40000020,
  324.       SPA_ATTRIB =     $40000022
  325.  
  326. ->***************************************************************************
  327. ->* BOB structure for BBV1.
  328.  
  329. CONST BBV1 = $42420000
  330.  
  331. OBJECT bob
  332.    version   :LONG  -> Structure version BBV1.
  333.    stats     :LONG  -> Private.
  334.    buffer    :INT   -> Buffer1/Buffer2/Buffer3
  335.    gfxdata   :LONG  -> Pointer to base of BOB graphics.
  336.    maskdata  :LONG  -> Pointer to base of BOB masks.
  337.    frame     :INT   -> Current frame.
  338.    framelist :LONG  -> Pointer to frame list.
  339.    srcwidth  :INT   -> Modulo (skip in source) in bytes.
  340.    width     :INT   -> Width in pixels.
  341.    bytewidth :INT   -> Width in bytes.
  342.    height    :INT   -> Height in pixels.
  343.    xcoord    :INT   -> To X pixel.
  344.    ycoord    :INT   -> To Y pixel.
  345.    clipLX    :INT   -> Left X border in bytes (0/8)
  346.    clipTY    :INT   -> Top Y border (0)
  347.    clipRX    :INT   -> Right X border in bytes (320/8)
  348.    clipBY    :INT   -> Bottom Y border (256)
  349.    fplane    :INT   -> 1st Plane to blit to (planar only)
  350.    planes    :INT   -> Amount of planes
  351.    planesize :LONG  -> Size Of Plane Source (planar only)
  352.    attrib    :LONG  -> Attributes like CLIP and MASK.
  353.    picture   :LONG  -> Pointer to a picture struct (bob origin).
  354. ENDOBJECT
  355.  
  356. CONST BBA_GfxData =   $C0000008,
  357.       BBA_MaskData =  $C000000C,
  358.       BBA_Frame =     $40000010,
  359.       BBA_FrameList = $C0000012,
  360.       BBA_SrcWidth =  $40000016,
  361.       BBA_Width =     $40000018,
  362.       BBA_ByteWidth = $4000001A,
  363.       BBA_Height =    $4000001C,
  364.       BBA_XCoord =    $4000001E,
  365.       BBA_YCoord =    $40000020,
  366.       BBA_ClipLX =    $40000022,
  367.       BBA_ClipTY =    $40000024,
  368.       BBA_ClipRX =    $40000026,
  369.       BBA_ClipBY =    $40000028,
  370.       BBA_FPlane =    $4000002A,
  371.       BBA_Planes =    $4000002C,
  372.       BBA_PlaneSize = $8000002E,
  373.       BBA_Attrib =    $80000032,
  374.       BBA_Picture =   $C0000036
  375.  
  376. /* Multple BOB structure */
  377.  
  378. CONST MBV1 = $424D0000
  379.  
  380. OBJECT mbob
  381.    version    :LONG  -> Structure version MBV1.
  382.    stats      :LONG  -> Private.
  383.    buffer     :INT   -> Buffer1/Buffer2/Buffer3
  384.    gfxdata    :LONG  -> Pointer to base of BOB graphics.
  385.    maskdata   :LONG  -> Pointer to base of BOB masks.
  386.    amtentries :INT   -> Amount of entries.
  387.    framelist  :LONG  -> Pointer to frame list.
  388.    srcwidth   :INT   -> Modulo (skip in source) in bytes.
  389.    width      :INT   -> Width in pixels.
  390.    bytewidth  :INT   -> Width in bytes.
  391.    height     :INT   -> Height in pixels.
  392.    entrylist  :LONG  -> Pointer to entry list.
  393.    clipLX     :INT   -> Left X border in bytes (0/8)
  394.    clipTY     :INT   -> Top Y border (0)
  395.    clipRX     :INT   -> Right X border in bytes (320/8)
  396.    clipBY     :INT   -> Bottom Y border (256)
  397.    fplane     :INT   -> 1st Plane to blit to (planar only)
  398.    planes     :INT   -> Amount of planes
  399.    planesize  :LONG  -> Size Of Plane Source (planar only)
  400.    attrib     :LONG  -> Attributes like CLIP and MASK.
  401.    picture    :LONG  -> Pointer to a picture struct (bob origin).
  402.    entrysize  :INT   -> Size of each entry in the list.
  403. ENDOBJECT
  404.  
  405. OBJECT framelist
  406.    gfx_xcoord :INT
  407.    gfx_ycoord :INT
  408.    msk_xcoord :INT
  409.    msk_ycoord :INT
  410. ENDOBJECT
  411.  
  412. CONST CLIP =      $00000001,
  413.       MASK =      $00000002,
  414.       STILL =     $00000004,
  415.       CLEAR =     $00000008,
  416.       RESTORE =   $00000010,
  417.       DIRECT =    $00000020,
  418.       FILLMASK =  $00000040,
  419.       GENMASK =   $00000082,
  420.       GENMASKS =  $00000082,
  421.       CLRMASK =   $00000100,
  422.       CLRNOMASK = $00000000
  423.  
  424. CONST SKIPIMAGE = 32000,
  425.       SKIPPIXEL = -32000
  426.  
  427. ->***************************************************************************
  428. ->* The picture structure for loading and depacking of pictures.
  429.  
  430. CONST PCV1 = $50430000
  431.  
  432. OBJECT picture
  433.    version    :LONG  -> PCV1
  434.    stats      :LONG  -> Reserved.
  435.    data       :LONG  -> Source.
  436.    width      :INT   -> Picture width
  437.    bytewidth  :INT   -> Picture byte width
  438.    height     :INT   -> Picture height
  439.    planes     :INT   -> Amount of planes
  440.    amtcolours :LONG  -> Amount of colours.
  441.    palette    :LONG  -> Pointer to Palette.
  442.    scrmode    :INT   -> Intended screen mode for picture.
  443.    scrtype    :INT   -> Interleaved/Chunky/Planar
  444.    options    :LONG  -> GETPALETTE/VIDEOMEM/REMAP...
  445.    file       :LONG  -> Where this picture comes from.
  446. ENDOBJECT
  447.  
  448. CONST PCA_DATA =       $C0000008,
  449.       PCA_WIDTH =      $4000000C,
  450.       PCA_BYTEWIDTH =  $4000000E,
  451.       PCA_HEIGHT =     $40000010,
  452.       PCA_PLANES =     $40000012,
  453.       PCA_AMTCOLOURS = $80000014,
  454.       PCA_PALETTE =    $C0000018,
  455.       PCA_SCRMODE =    $4000001C,
  456.       PCA_SCRTYPE =    $4000001E,
  457.       PCA_OPTIONS =    $80000020,
  458.       PCA_FILE =       $C0000024
  459.  
  460. CONST GETPALETTE = $00000001,
  461.       VIDEOMEM =   $00000002,
  462.       REMAP =      $00000004,
  463.       GETVMODE =   $00000008,
  464.       RESIZEX =    $00000010,
  465.       BLITMEM =    $00000020,
  466.       RESIZEY =    $00000040,
  467.       RESIZE =     $00000050
  468.  
  469. ->***************************************************************************
  470. ->* Choose one of these for calling Set_Interrupt().
  471.  
  472. CONST INTB_INTEN = 14,  -> Master interrupt (enable only ) 
  473.   INTB_EXTER   = 13,  -> External interrupt 
  474.   INTB_DSKSYNC = 12,  -> Disk re-SYNChronized 
  475.   INTB_RBF     = 11,  -> serial port Receive Buffer Full 
  476.   INTB_AUD3    = 10,  -> Audio channel 3 block finished 
  477.   INTB_AUD2    = 9,   -> Audio channel 2 block finished 
  478.   INTB_AUD1    = 8,   -> Audio channel 1 block finished 
  479.   INTB_AUD0    = 7,   -> Audio channel 0 block finished 
  480.   INTB_BLIT    = 6,   -> Blitter finished 
  481.   INTB_VERTB   = 5,   -> start of Vertical Blank 
  482.   INTB_COPER   = 4,   -> Coprocessor 
  483.   INTB_PORTS   = 3,   -> I/O Ports and timers 
  484.   INTB_SOFTINT = 2,   -> software interrupt rest 
  485.   INTB_DSKBLK  = 1,   -> Disk Block done 
  486.   INTB_TBE     = 0    -> serial port Transmit Buffer Empty 
  487.  
  488. ->***************************************************************************
  489. ->*
  490.  
  491. OBJECT keys
  492.    id   :INT
  493.    key1 :CHAR
  494.    key2 :CHAR
  495.    key3 :CHAR
  496.    key4 :CHAR
  497. ENDOBJECT
  498.  
  499. ->***************************************************************************
  500. ->* Special Keypresses that can be returned from Read_Key().  All other
  501. ->* keys can be considered to be in ASCII format.
  502.  
  503. CONST K_SCS     = $80,      -> Screen switch (LEFTAMIGA + M) 
  504.       K_DEL     = $81,
  505.       K_HELP    = $82,
  506.       K_LSHIFT  = $83,
  507.       K_RSHIFT  = $84,
  508.       K_CAPS    = $85,
  509.       K_CTRL    = $86,
  510.       K_LALT    = $87,
  511.       K_RALT    = $88,
  512.       K_LAMIGA  = $89,
  513.       K_RAMIGA  = $8a,
  514.  
  515.       K_F1      = $8b,
  516.       K_F2      = $8c,
  517.       K_F3      = $8d,
  518.       K_F4      = $8e,
  519.       K_F5      = $8f,
  520.       K_F6      = $90,
  521.       K_F7      = $91,
  522.       K_F8      = $92,
  523.       K_F9      = $93,
  524.       K_F10     = $94,
  525.       K_F11     = $95,
  526.       K_F12     = $96,
  527.       K_F13     = $97,
  528.       K_F14     = $98,
  529.       K_F15     = $99,
  530.       K_F16     = $9a,
  531.       K_F17     = $9b,
  532.       K_F18     = $9c,
  533.       K_F19     = $9d,
  534.       K_F20     = $9e,
  535.  
  536.       C_UP      = $9f,
  537.       C_DOWN    = $a0,
  538.       C_RIGHT   = $a1,
  539.       C_LEFT    = $a2,
  540.  
  541.       K_SRIGHT  = $a3,      -> Special key on right 
  542.       K_SLEFT   = $a4,      -> Special key on left 
  543.  
  544.       K_TAB     = 09,
  545.       K_BAKSPC  = 08,
  546.       K_ENTER   = 10,
  547.       K_RETURN  = 10,
  548.       K_ESC     = $1b
  549.